<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改服务类型')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-type-edit" th:object="${type}">
			<input id="postId" name="postId" type="hidden" th:field="*{id}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">服务类型编码：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="typeCode" id="typeCode" th:field="*{typeCode}" required lay-verfiy="number">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">服务类型名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="typeName" id="typeName" th:field="*{typeName}" required>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "serviceType";
		$("#form-type-edit").validate({
			onkeyup: false,
			rules:{
				typeCode:{
					digits:true
				}
			},
			messages: {
				"typeCode": {
					remote: "类型编码应为数字"
				}
			},
			focusCleanup: true
		});
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/edit", $('#form-type-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
